/**
 * ClassName: Exercise04
 * Package: PACKAGE_NAME
 * Description:
 *
 * @Author fjorid
 * @Create 2025/2/18 21:15
 * @Version 1.0
 */
public class Exercise04 {
    public static void main(String[] args) {

        MyDate myBirthDate = new MyDate(1995, 3, 15);

        MyDate partnerBirthDate = new MyDate(1996, 7, 22);


        System.out.println("我的出生日期是：" + myBirthDate);
        System.out.println("我对象的出生日期是：" + partnerBirthDate);
    }
}

class MyDate {

    int year;

    int month;

    int day;

    // 构造方法，用于初始化日期对象
    public MyDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }


    @Override
    public String toString() {
        return year + "年" + month + "月" + day + "日";
    }
}

